<%@page import="java.io.PrintWriter"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fm" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'base.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	
  </head>

  
  <body>
<form id="pagerForm" method="post" action="<%=basePath%>inventory/all.do">
	<input type="hidden" name="totalCount" value="${requestScope.condition.totalCount}">
	<input type="hidden" name="numPerPage" value="${requestScope.condition.numPerPage}" />
	<input type="hidden" name="totalPage" value="${requestScope.condition.totalPage}" />
	<input type="hidden" name="pageNum" value="${requestScope.condition.pageNum}" />
	
	<input type="hidden" name="deptName" value="${requestScope.condition.deptName}"/>
	<input type="hidden" name="current_deptid" value="${requestScope.condition.current_deptid}"/>
	<input type="hidden" name="goodsName" value="${requestScope.condition.goodsName}"/>
	<input type="hidden" name="goodsId" value="${requestScope.condition.goodsId}"/>
	<input type="hidden" name="storage_time" value="${requestScope.condition.storage_time}"/>
	<input type="hidden" name="code" value="${requestScope.condition.code}"/>
	<input type="hidden" name="statusName" value="${requestScope.condition.statusName}"/>
</form>


<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="<%=basePath%>inventory/all.do" method="post">
	<div class="searchBar">
		<table class="searchContent">
			<tr>
			<!-- 用户自定义条件查询 -->
				<td>
				部门名称:
				     <c:if test="${requestScope.condition.username eq 'admin'}">
					    <input class="required" bringbackname="district.deptname"    type="text" name="deptName"  readonly/>
					</c:if>
					<c:if test="${requestScope.condition.username != 'admin'}">
					    <input class="required" value="${requestScope.condition.deptName}"  type="text" name="deptName"  readonly/>
					</c:if>
					
				    <input class="required" bringbackname="district.deptid" type="hidden" name="current_deptid"/>
			
					</td>
					<td > 
					<a  class="btnLook" href="dept/showtree.do" lookupGroup="district">查找带回</a>
						<input type="reset" value="清空" />
						</td>
				
				
				
				<td>
					促销品名字：<input type="text" name="goodsName"  />
				</td>
				<td>
					产品编号：<input type="text" name="goodsId"  />
				</td>
				</tr>
				<tr>
				<td>
					入库时间:<input type="text" name="storage_time" class="date" readonly="true" />
				</td>
				<td></td>
				<td>
					入库流水号：<input type="text" name="code"  />
				</td>
				<td>
					&nbsp;&nbsp;状态：<select name="statusName" >
					       <option ></option>
					     <option value="0">在库</option>
				         <option value="1">出库</option>
				         <option value="2">报损</option>
				</select>
				</td>
			</tr>
		</table>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
		<!-- 用户具体操作按钮 -->
		           <li><a class="add" href="inventory/storage.do" target="navTab" mask="true"  title="入库" ><span>入库</span></a></li>
					<li><a class="edit" href="inventory/outRecord.do?ID={goodsId}" target="dialog"  title="请选择在库商品出库 "><span>出库</span></a></li>
                     <li><a class="edit" href="inventory/outRecordActivity.do" target="navTab" mask="true" title="活动出库" ><span>活动出库</span></a></li>
                     <li><a class="edit" href="inventory/back.do?ID={goodsId}" target="dialog" mask="true" title="请选择出库商品回退" ><span>回退</span></a></li>

                     <li><a class="edit" href="inrecords/in.do" target="navTab" mask="true" title="入库日志" rel="tj"><span>入库日志</span></a></li>
                     <li><a class="edit" href="inrecords/out.do" target="navTab" mask="true" title="出库日志" rel="tj"><span>出库日志</span></a></li>
                     <li><a class="edit" href="inventory/getupdate.do?ID={goodsId}" target="dialog" mask="true" title="修改信息" rel="tj"><span>修改信息</span></a></li>
                     <li><a class="icon" href="inventory/export.do" target="dwzExport" targetType="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
			<li class="line">line</li>

			
		</ul>
	</div>
	<div  class="pageHeader"> <label style="height:15px;background-color:red" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>已过期</div>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
			<c:if test="${requestScope.condition.numPerPage == '10'}">
				<option value="10" selected>10</option>
				<option value="20" >20</option>
				<option value="50" >50</option>
			</c:if>
			<c:if test="${requestScope.condition.numPerPage == '20'}">
				<option value="10" >10</option>
				<option value="20" selected>20</option>
				<option value="50" >50</option>
			</c:if>
			<c:if test="${requestScope.condition.numPerPage == '50'}">
				<option value="10" >10</option>
				<option value="20" >20</option>
				<option value="50" selected>50</option>
			</c:if>
			</select>
			<span>条，共${requestScope.condition.totalCount}条</span>
		</div>
	<div class="pagination" targetType="navTab" totalCount="${requestScope.condition.totalCount}" numPerPage="${requestScope.condition.numPerPage}" pageNumShown="5" currentPage="${requestScope.condition.pageNum}"></div>
     </div>
     <!--展示用户想要的具体信息 -->
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="3%" align="center">序号</th>
				<th width="20%">产品编号</th>
				<th width="15%">商品名字</th>
				<th width="5%">状态</th>
				<th width="10%" align="center">当前库房</th>
				<th width="5%" align="center">数量</th>
				<th width="15%" align="center">入库时间</th>
				<th width="10%" align="center">入库流水号</th>
				<th width="10%" align="center">有效时间</th>
			</tr>
		</thead>
		<tbody>
		<c:if test="${!empty requestScope.goods }">
			<c:forEach items="${requestScope.goods }" var="role" varStatus="status">
		
			<tr target="goodsId" rel="${role.goodsId }" <c:if test="${role.pannum==1}"> style="color:red"  </c:if>   >
				<td>${status.index + 1}</td>
				<td>${role.goodsId }</td>
				<td>${role.goodsName }</td>
				<td>${role.statusName }</td>
				<td>${role.deptName }</td>
				<td>${role.sum }</td>
				<td>${role.storage_time }</td>
				<td>${role.code }</td>
				<td>${role.effective_time }</td>
			</tr>
			</c:forEach>
		</c:if>
		</tbody>
	</table>
	

</div> 
  </body>
</html>
